package com.wxw.BaseLibrary.http.soap;

import com.google.gson.Gson;
import com.wxw.BaseLibrary.element.JsonObject;
import com.wxw.BaseLibrary.element.JsonProperty;
import com.wxw.BaseLibrary.infa.IJson;

import java.util.HashMap;
import java.util.Iterator;
import java.util.List;

/**
 * Created by david on 2016/5/10.
 */
public class SoapRequestParam implements IJson {
    private String key;
    /**
     * 0为字符串，1为byte[],2为文件
     */
    private int type;
    private Object value;

    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public Object getValue() {
        return value;
    }

    public void setValue(Object value) {
        this.value = value;
    }

    @Override
    public String toJson() {
        return new Gson().toJson(this);
    }

    @Override
    public IJson parseJson(String json) {
        return new Gson().fromJson(json, SoapRequestParam.class);
    }
}
